package com.zdp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sesshomaru
 * @date 2021/7/29 20:46
 */
@RestController
public class HelloController {

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @GetMapping("set")
    public Object set() {
        redisTemplate.opsForSet().add("name","zdp","wh","zdp");

        return "success";
    }

    @GetMapping("hello")
    public String hello() {
        return "hello";
    }
}
